using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace KNCApp.GUI
{
    public partial class PlotterPage : UserControl
    {
        public PlotterPage()
        {
            InitializeComponent();
            InitCtrls();
        }

        #region PRIVATE
        private void InitCtrls()
        {
            //this.DoubleBuffered = true;
            perfChart1.TimerInterval = Business.SettingsMgr.GetUpdatePlotter();
            perfChart1.TimerMode = SpPerfChart.TimerMode.Simple;

            perfChart2.TimerInterval = Business.SettingsMgr.GetUpdatePlotter();
            perfChart2.TimerMode = SpPerfChart.TimerMode.Simple;

            perfChart1.PerfChartStyle.ChartTitle = "Kapnogram";
            perfChart2.PerfChartStyle.ChartTitle = "Pletyzmogram";

        }

        public void UpdatePlotters(Business.Models.ChartResult r)
        {
            perfChart1.AddValue(r.CAP);//kapnogram
            perfChart2.AddValue(r.PLE);//pletyzmogram
        }
        #endregion
    }
}
